// 用来 mock 数据
import { MockMethod } from "vite-plugin-mock";

// 产生 mock 数据
export default [
  {
    url: "/api/login",
    method: "post",
    response: (res) => {
      return {
        code: 0, // 成功状态码
        message: "sucsess",
        result: {
          token: "jwt aaabb",
          username: res.body.username,
          userage: Math.floor(Math.random() * 30),
          usersex: ["nan", "nv"][Math.floor(Math.random() * 2)]
        }
      };
    }
  }
] as MockMethod[];
